#define _CRT_SECURE_NO_WARNINGS

#include<string>
using namespace std;
int FirstNotRepeatingChar(string str) {
    int bitmap = 0;
    for (auto& ch : str)
    {
        int i = ch - 'a';
        if (((bitmap >> i) & 1) == 0) bitmap |= 1 << i;
    }
    for (int i = 0; i < str.size(); i++)
    {
        int c = str[i] - 'a';
        if (((bitmap >> c) & 1) == 0) return i;
    }
    return -1;
}
int main()
{
    FirstNotRepeatingChar("google");
    return 0;
}